//
//  KKBusinessView.m
//  Butler
//
//  Created by liaozhenming on 16/6/20.
//  Copyright © 2016年 liaozhenming. All rights reserved.
//

#import "KKBusinessView.h"

@implementation KKBusinessView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame: frame];
    if (self) {
        
        self.backgroundColor = [UIColor kk_colorWithHexString: @"f0f0f0"];
        
        UICollectionViewFlowLayout *flowLayout = [UICollectionViewFlowLayout new];
        flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
        flowLayout.itemSize = CGSizeMake(CGRectGetHeight(frame) - 40, CGRectGetHeight(frame) - 40);
        _itemCollectionView = [[UICollectionView alloc] initWithFrame: [self bounds] collectionViewLayout: flowLayout];
        _itemCollectionView.showsHorizontalScrollIndicator = NO;
        _itemCollectionView.backgroundColor = [UIColor clearColor];
        [self addSubview: _itemCollectionView];
    }
    return self;
}
@end
